package com.ls.service;

import com.ls.mapper.RolePermissionMapper;
import com.ls.model.RolePermission;
import com.ls.util.BaseMapper;
import com.ls.util.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p></p>
 * Created by zhezhiyong@163.com on 2017/2/16.
 */
@Service
public class RolePermissionService extends BaseServiceImpl<RolePermission, Integer> {

    @Resource
    private RolePermissionMapper rolePermissionMapper;

    @Override
    public BaseMapper getMapper() {
        return rolePermissionMapper;
    }

    public int deleteByRoleId(int roleId){
        return rolePermissionMapper.deleteByRoleId(roleId);
    }

    public List<String> selectPermissionIdByRoleId(int roleId){
        return rolePermissionMapper.selectPermissionIdByRoleId(roleId);
    }
}
